package com.zhu.tool_test.datacenter.dto;

import com.linktopa.framework.common.model.response.ResultCode;
import lombok.ToString;

/**
 * @Description 公共响应代码封装
 * @author yhD
 * @date 2020-09-24
 * @version 1.0
 */
@ToString
public enum DataCenterCommonCode implements ResultCode {

    NO_DATA(false,30001," 资源中心没有数据"),
    FAIL_PARAM(false,30002," 参数错误");
    //操作是否成功
    boolean success;
    //操作代码
    int code;
    //提示信息
    String message;
    private DataCenterCommonCode(boolean success, int code, String message){
        this.success = success;
        this.code = code;
        this.message = message;
    }

    @Override
    public boolean success() {
        return success;
    }
    @Override
    public int code() {
        return code;
    }
    @Override
    public String message() {
        return message;
    }

}
